Vector spaces
Lecture 11
Recap
$$ % Colors
% Coordinate vectors and matrices
% Common sets
% Abstract vector symbols
% Norms / absolute value
% Optional: dot product spacing (looks nicer in slides)
% Operators $$
Transition matrix as redistribution
- We can interpret the transition matrix
\(P = [\vec{p}_1 \ \cdots \ \vec{p}_N]\) of a Markov chain as a redistribution rule. - Suppose there are \(N\) types of an object, and let
\(\vec{\lambda}_0 = \langle \lambda_1, \dots, \lambda_N \rangle\) represent the number of objects of each type. - After one unit of time, each type-\(m\) object changes type according to the proportions \(\vec{p}_m = \langle p_{1m}, \dots, p_{Nm} \rangle\).
- Since \(p_{1m} + \cdots + p_{Nm} = 1\), the total number of objects is preserved. In particular, if there are \(\lambda_m\) objects of type \(m\), then \(p_{1m}\lambda_m\) become type \(1\), \(p_{2m}\lambda_m\) become type \(2\), and so on.
- Thus, the transition matrix redistributes the total amount \(\lambda_m\) of type \(m\) among all types.
Transition matrix as redistribution
- Recall that \(P = [\vec{p}_1 \ \cdots \ \vec{p}_N]\), viewed as a linear transformation, sends \(\vec{e}_m\) (one object of type \(m\)) to \(\vec{p}_m\). This exactly matches our redistribution model.
- After one unit of time, the numbers of each type are given by \[ \vec{\lambda}_1 = P \vec{\lambda}_0. \]
- After \(k\) time units, the numbers of each type are given by \[ \vec{\lambda}_k = P^k \vec{\lambda}_0. \] The total amount remains unchanged.
Example
- Suppose there are three chemicals: \(100\) grams of A, \(100\) grams of B, and \(0\) grams of C.
- Every minute:
- \(20\%\) of A transforms into B, \(30\%\) transforms into C, and the rest remains A;
- \(50\%\) of B transforms into A, and the rest remains B;
- \(30\%\) of C transforms into A, and \(70\%\) transforms into B.
- Find the column transition matrix.
- Write a formula using matrix multiplication to compute the amounts of A, B, and C after \(10\) minutes.
Answer
Since we are using the column convention, the \(m\)th column lists the fractions that go from type \(m\) to types \(A,B,C\) (in that row order).
From A: \(50\%\) stays A, \(20\%\) goes to B, \(30\%\) goes to C, so \[ \vec p_A=\begin{pmatrix}0.5\\0.2\\0.3\end{pmatrix}. \]
From B: \(50\%\) goes to A, \(50\%\) stays B, \(0\%\) goes to C, so \[ \vec p_B=\begin{pmatrix}0.5\\0.5\\0\end{pmatrix}. \]
From C: \(30\%\) goes to A, \(70\%\) goes to B, \(0\%\) stays C, so \[ \vec p_C=\begin{pmatrix}0.3\\0.7\\0\end{pmatrix}. \]
Therefore the column transition matrix is \[ P=\begin{pmatrix} 0.5 & 0.5 & 0.3\\ 0.2 & 0.5 & 0.7\\ 0.3 & 0 & 0 \end{pmatrix}. \]
Let \[ \vec{\lambda}_0=\begin{pmatrix}100\\100\\0\end{pmatrix} \] be the initial amounts (in grams). Then after \(10\) minutes, \[ \vec{\lambda}_{10}=P^{10}\vec{\lambda}_0 \approx \langle 94.34, 77.36, 28.30 \rangle. \]
Check: \(94.34+77.36+28.30=200.00\), so total mass is preserved.
Markov chain and probabilities
- In a Markov chain, there is a single object whose type changes randomly according to given transition probabilities.
- You can think of the object’s total “presence” as \(100\%\) (or \(1\)), which is redistributed among the states at each step.
- This leads to a probability vector, whose entries always sum to \(1\), since total probability is conserved.
- As before, the probability vector evolves according to \[ \vec{\pi}_k = P^k\,\vec{\pi}_0. \]
- The \(n\)th entry of \(\vec{\pi}_k\) can be interpreted as
“the probability that the object is of type \(n\) after \(k\) time steps, given the initial probability distribution \(\vec{\pi}_0\).”
Abstract Vector Spaces
Motivation
- So far, we have discussed vectors in \(\mathbb{R}^n\), which can be represented using coordinates.
- However, we often wrote vectors abstractly as \(\vec v\), without referring to coordinates, and discussed concepts such as linear combinations \(\vec w = c_1\vec v_1 + c_2\vec v_2\) or linear transformations \(\vec w = A\vec v\).
- In fact, linear combinations can be defined for many objects that do not live in Euclidean space.
- This allows us to study linear algebra on more abstract spaces, even though each “vector” may not look like an arrow in \(\mathbb{R}^n\).
Examples of Linear Combinations
Let \(c_1, c_2\) be real numbers.
- If \(A, B\) are \(3\times 3\) matrices, then \[C = c_1 A + c_2 B\] is also a \(3\times 3\) matrix.
- If \(x, y\) are complex numbers, then \[z = c_1 x + c_2 y\] is also a complex number.
- If \(A(x), B(x)\) are polynomials, then \[C(x) = c_1 A(x) + c_2 B(x)\] is also a polynomial.
- If \(A(x), B(x)\) are continuous functions, then \[C(x) = c_1 A(x) + c_2 B(x)\] is also a continuous function.
- If \(A(x), B(x)\) are twice-differentiable functions, then \[C(x) = c_1 A(x) + c_2 B(x)\] is also a twice-differentiable function.
Vector Space
- A vector space is a “safe ground” where linear combinations are always allowed and stay inside the space.
- To even talk about linear combinations, we must be able to add vectors and multiply them by scalars.
- Moreover, the space must be closed under these operations: performing them should never take us outside the space.
Definition of a Vector Space
Let \(V\) be a set equipped with two operations: vector addition and scalar multiplication. If the following axioms hold for all \(\vec u,\vec v,\vec w \in V\) and all scalars \(c,d \in \mathbb{R}\), then \(V\) is called a vector space.
(Addition axioms)
- Closure under addition. \[\vec u + \vec v \in V.\]
- Commutative property. \[\vec u + \vec v = \vec v + \vec u.\]
- Associative property. \[\vec u + (\vec v + \vec w) = (\vec u + \vec v) + \vec w.\]
- Additive identity. There exists a vector \(\vec 0 \in V\) such that \[\vec u + \vec 0 = \vec u.\]
- Additive inverse. For every \(\vec u \in V\), there exists \(-\vec u \in V\) such that \[\vec u + (-\vec u) = \vec 0.\]
(Scalar multiplication axioms)
- Closure under scalar multiplication. \[c\vec u \in V.\]
- Distributive property (over vector addition). \[c(\vec u + \vec v) = c\vec u + c\vec v.\]
- Distributive property (over scalar addition). \[(c + d)\vec u = c\vec u + d\vec u.\]
- Associative property. \[c(d\vec u) = (cd)\vec u.\]
- Scalar identity. \[1\vec u = \vec u.\]
Example
Let \[ V = \{a_3x^3 + a_2x^2 + a_1x + a_0 \mid a_0,a_1,a_2,a_3 \in \mathbb{R}\}, \] the set of all polynomials of degree at most \(3\). We use the usual polynomial addition and scalar multiplication.
We check that \(V\) is a vector space:
- Closure under addition: The sum of two degree-\(\le 3\) polynomials is still degree \(\le 3\).
- Commutativity: Polynomial addition is commutative.
- Associativity: Polynomial addition is associative.
- Additive identity: The zero polynomial \(0(x)=0\) satisfies \(p(x)+0(x)=p(x)\).
- Additive inverse: For any \(p(x)\in V\), the polynomial \(-p(x)\) is also in \(V\) and \(p(x)+(-p(x))=0\).
- Closure under scalar multiplication: Multiplying a degree-\(\le 3\) polynomial by a scalar does not increase its degree.
- Distributivity over vector addition: \[c(p(x)+q(x)) = cp(x)+cq(x).\]
- Distributivity over scalar addition: \[(c+d)p(x) = cp(x)+dp(x).\]
- Associativity of scalar multiplication: \[c(dp(x)) = (cd)p(x).\]
- Scalar identity: \[1\cdot p(x) = p(x).\]
Therefore, \(V\) is a vector space.
Non-examples
- The set of fruits is not a vector space, since there is no meaningful way to define vector addition or scalar multiplication.
- The set of integers \(\mathbb{Z}\) is not a vector space because it is not closed under scalar multiplication. For example, \(1 \in \mathbb{Z}\) but \(0.5 \cdot 1 \notin \mathbb{Z}\).
- Let \(V=\{(x,y)\in\mathbb{R}^2 : x \ge 0,\ y \ge 0\}\). This set is not a vector space because it is not closed under scalar multiplication (e.g. multiplying by \(-1\) leaves the set).
- Let \(V=\{(x,y)\in\mathbb{R}^2 : xy = 0\}\). This set is not a vector space because it is not closed under vector addition: \[(1,0)\in V,\ (0,1)\in V,\quad \text{but } (1,0)+(0,1)=(1,1)\notin V.\]
Definition of a Subspace
- Let \(V\) be a vector space. A subspace \(W\) is a vector space contained inside \(V\).
- Since vector addition and scalar multiplication are already defined in \(V\), to check whether \(W\) is a subspace we only need to verify closure.
- A subset \(W \subset V\) is a subspace if for all \(\vec u,\vec v \in W\) and all \(c\in\mathbb{R}\), \[\vec u + \vec v \in W, \qquad c\vec u \in W.\]
Examples
Let \(a,b,c \in \mathbb{R}\) be fixed.
- The zero set \(W=\left\{\langle 0,0 \rangle\right\}\) is a subspace of \(V=\mathbb{R}^2\).
- The set of \(4\times 4\) upper triangular matrices is a subspace of the space of all \(4\times 4\) matrices \(V=M_{4\times 4}\).
- A line through the origin \(W=\{t\langle a,b \rangle : t\in\mathbb{R}\}\) is a subspace of \(V=\mathbb{R}^2\), since it is closed under vector addition and scalar multiplication.
- The plane \(W=\{(x,y,z)\in\mathbb{R}^3 : ax+by+cz=0\}\) is a subspace of \(V=\mathbb{R}^3\); we check this on the next slide.
Checking the plane example
- Let \(\vec u=(x_1,y_1,z_1)\) and \(\vec v=(x_2,y_2,z_2)\) be in \(W\). Then \[ax_1+by_1+cz_1=0,\qquad ax_2+by_2+cz_2=0.\]
- Adding, \[a(x_1+x_2)+b(y_1+y_2)+c(z_1+z_2)=0,\] so \(\vec u+\vec v\in W\).
- For any \(d\in\mathbb{R}\), \[a(dx_1)+b(dy_1)+c(dz_1)=d(ax_1+by_1+cz_1)=0,\] so \(d\vec u\in W\).
- Therefore, \(W\) is a subspace of \(\mathbb{R}^3\).